﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

using Weazel.Badger.Vhdl.Types;

#endregion

namespace Weazel.Badger.Vhdl.Expressions
{
  public class ArrayVariableReferenceExpression : Expression
  {
    private ArrayTypeValue array;

    public ArrayVariableReferenceExpression(
			IComponent parentContainer,
			ArrayTypeValue array
		) 
			: base(parentContainer, array.Type, null)
    {
      this.array = array;      
    }

    public override bool VerifyType(ref List<VerifyMessage> messages)
    {
      throw new NotImplementedException();
    }

		public override void SetActualType(Entity entity, Process process, Statements.StatementCollection statements, Vhdl.Types.Type type)
    {
      System.Diagnostics.Debug.Assert(array.Type == type);
      this.Type = type;
    }

    public override TypeSet GetPossibleTypes()
    {
      return new TypeSet(array.Type);
    }

    public override string ToString()
    {
      return array.ToString();
    }
  }
}
